home *** CD-ROM | disk | FTP | other *** search
/ World of Amiga / World of Amiga.iso / c / gnuplot.pch < prev    next >
Text File  |  1995-01-18  |  18KB  |  678 lines

  1. diff -C 2 -N --recursive gnuplot/command.c gnuplot.neu/command.c
  2. *** gnuplot/command.c    Thu Sep 16 06:59:44 1993
  3. --- gnuplot.neu/command.c    Sat Feb 05 21:21:34 1994
  4. ***************
  5. *** 122,126 ****
  6. --- 122,131 ----
  7.   #ifdef AMIGA_SC_6_1
  8.   #include <proto/dos.h>
  9. + #include <proto/exec.h>
  10. + #include <proto/rexxsyslib.h>
  11. + #include "term/amigawin.h"
  12.   void            sleep();
  13. + extern void UpdateVars(void);
  14. + extern struct MsgPort *RexxPort;
  15.   #endif                /* AMIGA_SC_6_1 */
  16.   
  17. ***************
  18. *** 479,482 ****
  19. --- 484,490 ----
  20.                   if( strcmp(term_tbl[term].name, "pm" )!=0 || stime >=0 )
  21.   #endif
  22. + #ifdef AMIGA_SC_6_1
  23. +         if( strcmp(term_tbl[term].name, "amigawindow" ) != 0 || stime >=0 )
  24. + #endif
  25.           (void) fprintf(stderr, "%s", buf);
  26.           text = 1;
  27. ***************
  28. *** 502,506 ****
  29.           }
  30.   #else
  31. !         (void) fgets(buf, MAX_LINE_LEN, stdin);
  32.       /* Hold until CR hit. */
  33.   #endif /*OS2*/
  34. --- 510,522 ----
  35.           }
  36.   #else
  37. ! #ifdef AMIGA_SC_6_1
  38. !     if (strcmp(term_tbl[term].name, "amigawindow") == 0 && stime < 0)
  39. !      {
  40. !       SendMsg(PAUSE, buf);
  41. !      }
  42. !     else
  43. !      fgets(buf, MAX_LINE_LEN, stdin);
  44. ! #else
  45. !             (void) fgets(buf, MAX_LINE_LEN, stdin);
  46.       /* Hold until CR hit. */
  47.   #endif /*OS2*/
  48. ***************
  49. *** 934,937 ****
  50. --- 950,957 ----
  51.       udv->udv_undef = FALSE;
  52.       }
  53. + #if defined(AMIGA_SC_6_1)
  54. +     if (interactive && (strcmp(term_tbl[term].name, "amigawindow") == 0))
  55. +      UpdateVars();
  56. + #endif
  57.   }
  58.   
  59. ***************
  60. *** 4145,4148 ****
  61. --- 4165,4173 ----
  62.       char           *prompt;
  63.   {
  64. + #ifdef AMIGA_SC_6_1
  65. +     char           *s;
  66. +     BOOL            io;
  67. +     struct RexxMsg *Msg;
  68. + #endif
  69.       int             start = 0;
  70.       TBOOLEAN         more = FALSE;
  71. ***************
  72. *** 4161,4164 ****
  73. --- 4186,4212 ----
  74.            : fgets(&(input_line[start]), MAX_LINE_LEN - start, stdin))
  75.           == (char *) NULL) {
  76. + #else
  77. + #ifdef AMIGA_SC_6_1
  78. +      io = FALSE;
  79. +      while (!io)
  80. +       {
  81. +        if (WaitForChar(Input(), 100000L))
  82. +         {
  83. +          s = fgets(&(input_line[start]), MAX_LINE_LEN - start, stdin);
  84. +          io = TRUE;
  85. +         }
  86. +        else if (Msg = (struct RexxMsg *)GetMsg(RexxPort))
  87. +         {
  88. +          if (IsRexxMsg(Msg))
  89. +           {
  90. +             strcpy(input_line, Msg->rm_Args[0]);
  91. +            fprintf(stderr, "%s\n", input_line);
  92. +            s = "";
  93. +             io = TRUE;
  94. +            }
  95. +           ReplyMsg(Msg);
  96. +          }
  97. +        }
  98. +         if (s == (char *)NULL) {
  99.   #else
  100.       if (fgets(&(input_line[start]), MAX_LINE_LEN - start, stdin)
  101. diff -C 2 -N --recursive gnuplot/linkopt.amg gnuplot.neu/linkopt.amg
  102. *** gnuplot/linkopt.amg    Wed May 12 04:21:50 1993
  103. --- gnuplot.neu/linkopt.amg    Sun Jan 30 21:47:40 1994
  104. ***************
  105. *** 4,7 ****
  106.        setshow.o specfun.o standard.o term.o util.o version.o
  107.   TO gnuplot
  108. ! LIB LIB:scmieee.lib LIB:scnb.lib
  109.   STRIPDEBUG
  110. --- 4,7 ----
  111.        setshow.o specfun.o standard.o term.o util.o version.o
  112.   TO gnuplot
  113. ! LIB LIB:scmieee.lib LIB:scnb.lib LIB:debug.lib LIB:amiga.lib
  114.   STRIPDEBUG
  115. diff -C 2 -N --recursive gnuplot/makefile.amg gnuplot.neu/Makefile.amg
  116. *** gnuplot/makefile.amg    Thu Sep 16 06:59:48 1993
  117. --- gnuplot.neu/Makefile.amg    Sun Jan 30 21:47:39 1994
  118. ***************
  119. *** 13,16 ****
  120. --- 13,17 ----
  121.   
  122.   OFLAGS = OPT OPTGO OPTPEEP NOOPTINL NOOPTINLOCAL
  123. + #OFLAGS = DEBUG=SF CODE=FAR
  124.   DEFS   = DEF=AMIGA_SC_6_1 DEF=MEMCPY
  125.   COPTS  = DATA=FAR MATH=IEEE IGN=84+85+88+94+100+154+161+217+304
  126. ***************
  127. *** 30,34 ****
  128.   CSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm term/atari.trm \
  129.       term/bigfig.trm term/cgi.trm term/corel.trm \
  130. !     term/djsvga.trm term/dumb.trm \
  131.       term/dxf.trm term/dxy.trm \
  132.       term/debug.trm term/eepic.trm term/epson.trm term/excl.trm \
  133. --- 31,35 ----
  134.   CSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm term/atari.trm \
  135.       term/bigfig.trm term/cgi.trm term/corel.trm \
  136. !     term/djsvga.trm term/dumb.trm term/amigawin.trm term/amigawin.h\
  137.       term/dxf.trm term/dxy.trm \
  138.       term/debug.trm term/eepic.trm term/epson.trm term/excl.trm \
  139. diff -C 2 -N --recursive gnuplot/plot.c gnuplot.neu/plot.c
  140. *** gnuplot/plot.c    Thu Sep 16 06:59:50 1993
  141. --- gnuplot.neu/plot.c    Tue Nov 16 00:17:36 1993
  142. ***************
  143. *** 72,75 ****
  144. --- 72,80 ----
  145.   #ifdef AMIGA_SC_6_1
  146.   #include <proto/dos.h>
  147. + #include <proto/exec.h>
  148. + #include <proto/rexxsyslib.h>
  149. + struct Library *RexxSysBase;
  150. + struct MsgPort *RexxPort;
  151.   #endif
  152.   
  153. ***************
  154. *** 267,270 ****
  155. --- 272,278 ----
  156.       char **argv;
  157.   {
  158. +  char cwd[MAX_ID_LEN];
  159. +  getcwd(cwd, MAX_ID_LEN);
  160.   #ifdef XPG3_LOCALE
  161.       (void) setlocale(LC_CTYPE, "");
  162. ***************
  163. *** 304,307 ****
  164. --- 312,318 ----
  165.        if (IsInteractive(Input()) == DOSTRUE) interactive = TRUE;
  166.        else interactive = FALSE;
  167. +      RexxPort = NULL;
  168. +      if (RexxSysBase = OpenLibrary("rexxsyslib.library", 36))
  169. +       RexxPort = CreatePort("REXXPLOT", 0);
  170.   #else
  171.   #if defined(__MSC__) && defined(_Windows)
  172. ***************
  173. *** 379,382 ****
  174. --- 390,400 ----
  175.       vms_reset();
  176.   #endif
  177. + #ifdef AMIGA_SC_6_1
  178. +     if (RexxPort) DeletePort(RexxPort);
  179. +     if (RexxSysBase) CloseLibrary(RexxSysBase);
  180. + #endif
  181. +    
  182. +     chdir(cwd);
  183.       return(IO_SUCCESS);
  184.   }
  185. diff -C 2 -N --recursive gnuplot/setshow.c gnuplot.neu/setshow.c
  186. *** gnuplot/setshow.c    Thu Sep 16 06:59:52 1993
  187. --- gnuplot.neu/setshow.c    Mon Jan 31 08:09:17 1994
  188. ***************
  189. *** 200,203 ****
  190. --- 200,208 ----
  191.   #endif
  192.   #endif
  193. + #if defined(AMIGA_SC_6_1)
  194. + #include <exec/ports.h>
  195. + #include "term/amigawin.h"
  196. + struct SetVar SetVars;
  197. + #endif
  198.   
  199.   #if defined(unix) || defined(PIPES)
  200. ***************
  201. *** 213,216 ****
  202. --- 218,222 ----
  203.   extern char replot_line[];
  204.   extern struct udvt_entry *first_udv;
  205. + extern struct udft_entry *first_udf;
  206.   extern TBOOLEAN is_3d_plot;
  207.   
  208. ***************
  209. *** 252,255 ****
  210. --- 258,326 ----
  211.   static TBOOLEAN show_one(), show_two();
  212.   
  213. + #if defined(AMIGA_SC_6_1)
  214. + void UpdateVars(void)
  215. + {
  216. +  SetVars.xmin = xmin;
  217. +  SetVars.xmax = xmax;
  218. +  SetVars.ymin = ymin;
  219. +  SetVars.ymax = ymax;
  220. +  SetVars.zmin = zmin;
  221. +  SetVars.zmax = zmax;
  222. +  SetVars.rmin = rmin;
  223. +  SetVars.rmax = rmax;
  224. +  SetVars.tmin = tmin;
  225. +  SetVars.tmax = tmax;
  226. +  SetVars.umin = umin;
  227. +  SetVars.umax = umax;
  228. +  SetVars.vmin = vmin;
  229. +  SetVars.vmax = vmax;
  230. +  SetVars.autox = autoscale_x;
  231. +  SetVars.autoy = autoscale_y;
  232. +  SetVars.autoz = autoscale_z;
  233. +  SetVars.autor = autoscale_r;
  234. +  SetVars.autot = autoscale_t;
  235. +  SetVars.autou = autoscale_u;
  236. +  SetVars.autov = autoscale_v;
  237. +  SetVars.contour = draw_contour;
  238. +  SetVars.hidden3d = hidden3d;
  239. +  SetVars.surface = draw_surface;
  240. +  SetVars.mapping = mapping3d;
  241. +  SetVars.rotx = surface_rot_x;
  242. +  SetVars.rotz = surface_rot_z;
  243. +  SetVars.scale = surface_scale;
  244. +  SetVars.zscale = surface_zscale;
  245. +  SetVars.logx = is_log_x;
  246. +  SetVars.logy = is_log_y;
  247. +  SetVars.logz = is_log_z;
  248. +  SetVars.basex = base_log_x;
  249. +  SetVars.basey = base_log_y;
  250. +  SetVars.basez = base_log_z;
  251. +  SetVars.datastyle = data_style;
  252. +  SetVars.functionstyle = func_style;
  253. +  SetVars.title = title;
  254. +  SetVars.title_xoff = title_xoffset;
  255. +  SetVars.title_yoff = title_yoffset;
  256. +  SetVars.xlabel = xlabel;
  257. +  SetVars.xlabel_xoff = xlabel_xoffset;
  258. +  SetVars.xlabel_yoff = xlabel_yoffset;
  259. +  SetVars.ylabel = ylabel;
  260. +  SetVars.ylabel_xoff = ylabel_xoffset;
  261. +  SetVars.ylabel_yoff = ylabel_yoffset;
  262. +  SetVars.zlabel = zlabel;
  263. +  SetVars.zlabel_xoff = zlabel_xoffset;
  264. +  SetVars.zlabel_yoff = zlabel_yoffset;
  265. +  SetVars.replot = replot_line;
  266. +  SetVars.parametric = parametric;
  267. +  SetVars.polar = polar;
  268. +  SetVars.grid = grid;
  269. +  SetVars.border = draw_border;
  270. +  SetVars.xzeroaxis = xzeroaxis;
  271. +  SetVars.yzeroaxis = yzeroaxis;
  272. +  SetVars.user_variables = first_udv;
  273. +  SetVars.user_functions = first_udf;
  274. +  SendMsg(SETVAR, &SetVars);
  275. + }
  276.   /******** The 'set' command ********/
  277.   void
  278. ***************
  279. *** 273,276 ****
  280. --- 344,351 ----
  281.       if (!set_one() && !set_two() && !set_three())
  282.       int_error(setmess, c_token);
  283. + #if defined(AMIGA_SC_6_1)
  284. +     else if (interactive && (strcmp(term_tbl[term].name, "amigawindow") == 0))
  285. +         UpdateVars();
  286. + #endif
  287.   }
  288.   
  289. diff -C 2 -N --recursive gnuplot/term/amiga.trm gnuplot.neu/term/amiga.trm
  290. *** gnuplot/term/amiga.trm    Thu Sep 16 07:00:02 1993
  291. --- gnuplot.neu/term/amiga.trm    Sun Oct 24 23:30:34 1993
  292. ***************
  293. *** 55,61 ****
  294. --- 55,64 ----
  295.   #else
  296.   /* You will have to use the Kickstart 2.0 header files for this to compile */
  297. + #include <dos/dostags.h>
  298. + #include <exec/memory.h>
  299.   #include <exec/types.h>
  300.   #include <intuition/intuitionbase.h>
  301.   #include <graphics/gfxbase.h>
  302. + #include <proto/dos.h>
  303.   #include <proto/intuition.h>
  304.   #include <proto/graphics.h>
  305. ***************
  306. *** 102,106 ****
  307.   static WORD AMIGA_cwd,AMIGA_cht,AMIGA_bsl,AMIGA_vadj;
  308.   static struct TagItem AMIGA_ScrTagList[] = {
  309. !   {SA_Overscan,OSCAN_TEXT},{TAG_DONE,0}
  310.   };
  311.   
  312. --- 105,111 ----
  313.   static WORD AMIGA_cwd,AMIGA_cht,AMIGA_bsl,AMIGA_vadj;
  314.   static struct TagItem AMIGA_ScrTagList[] = {
  315. !   {SA_Overscan,OSCAN_TEXT},
  316. !   {SA_LikeWorkbench, TRUE},
  317. !   {TAG_DONE,0}
  318.   };
  319.   
  320. diff -C 2 -N --recursive gnuplot/term/amigawin.h gnuplot.neu/term/amigawin.h
  321. *** gnuplot/term/amigawin.h    Thu Jan 01 01:00:00 1970
  322. --- gnuplot.neu/term/amigawin.h    Sun Jan 30 23:46:06 1994
  323. ***************
  324. *** 0 ****
  325. --- 1,59 ----
  326. + #define GNUPORT  "GnuPlot.Port"
  327. + #define GNUREPLY "GnuPlot.Reply"
  328. + #define RESOLUTION 1024
  329. + enum GnuPlotCom
  330. + {
  331. +  RESET, SET_GRAPHICS, SET_TEXT, PAUSE, SETVAR
  332. + };
  333. + struct GnuPlotCommand
  334. + {
  335. +  enum GnuPlotCom      gpc_com;
  336. +  void                *gpc_arg;
  337. +  int                  gpc_ncommands;
  338. +  struct PlotCommand  *gpc_commands;
  339. + };
  340. + enum PlotCom
  341. + {
  342. +  LINETYP, MOVE, VECTOR, PUT_TEXT, JUSTIFY, TEXT_ANGLE
  343. + };
  344. + struct PlotCommand
  345. + {
  346. +  enum PlotCom   pc_com;
  347. +  int            pc_arg1, pc_arg2;
  348. +  char          *pc_argstr;
  349. + };
  350. + struct PlotMessage
  351. + {
  352. +  struct Message        PlotMsg;
  353. +  struct GnuPlotCommand PlotCom;
  354. + };
  355. + struct SetVar 
  356. + {
  357. +  double xmin, xmax, ymin, ymax, zmin, zmax, rmin, rmax, tmin, tmax, umin, umax, vmin, vmax;
  358. +  BOOL   autox, autoy, autoz, autor, autot, autou, autov;
  359. +  double basex, basey, basez;
  360. +  BOOL   logx, logy, logz;
  361. +  BOOL   hidden3d, surface;
  362. +  double rotx, rotz, scale, zscale;
  363. +  int    contour;
  364. +  int    functionstyle, datastyle;
  365. +  char  *title, *xlabel, *ylabel, *zlabel;
  366. +  int    title_xoff, title_yoff, xlabel_xoff, xlabel_yoff, ylabel_xoff, ylabel_yoff,
  367. +         zlabel_xoff, zlabel_yoff;
  368. +  char  *replot;
  369. +  BOOL   parametric, polar, grid, border, xzeroaxis, yzeroaxis;
  370. +  int    mapping;
  371. +  struct udvt_entry *user_variables;
  372. +  struct udft_entry *user_functions;
  373. + };
  374. + extern void SendMsg(enum GnuPlotCom, char *);
  375. + extern void UpdateVars(void);
  376. diff -C 2 -N --recursive gnuplot/term/amigawin.trm gnuplot.neu/term/amigawin.trm
  377. *** gnuplot/term/amigawin.trm    Thu Jan 01 01:00:00 1970
  378. --- gnuplot.neu/term/amigawin.trm    Sun Jan 16 09:38:16 1994
  379. ***************
  380. *** 0 ****
  381. --- 1,200 ----
  382. + /*
  383. +  * $Id: debug.trm%v 3.38.2.70 1993/02/08 02:17:40 woo Exp woo $
  384. +  *
  385. +  */
  386. + /* GNUPLOT - debug.trm */
  387. + /*
  388. +  * Copyright (C) 1990   
  389. +  *
  390. +  * Permission to use, copy, and distribute this software and its
  391. +  * documentation for any purpose with or without fee is hereby granted, 
  392. +  * provided that the above copyright notice appear in all copies and 
  393. +  * that both that copyright notice and this permission notice appear 
  394. +  * in supporting documentation.
  395. +  *
  396. +  * Permission to modify the software is granted, but not the right to
  397. +  * distribute the modified code.  Modifications are to be distributed 
  398. +  * as patches to released version.
  399. +  *  
  400. +  * This software  is provided "as is" without express or implied warranty.
  401. +  * 
  402. +  * This file is included by ../term.c.
  403. +  *
  404. +  * This terminal driver supports:
  405. +  *  DEBUG
  406. +  *
  407. +  * AUTHORS
  408. +  *    luecken@udel.edu
  409. +  * 
  410. +  * send your comments or suggestions to (luecken@udel.edu).
  411. +  * 
  412. +  */
  413. + #include "amigawin.h"
  414. + #define AMIWIN_XMAX RESOLUTION
  415. + #define AMIWIN_YMAX RESOLUTION
  416. + #define AMIWIN_XLAST (AMIWIN_XMAX - 1)
  417. + #define AMIWIN_YLAST (AMIWIN_XMAX - 1)
  418. + /* Assume a character size of 1, or a 7 x 10 grid. */
  419. + #define AMIWIN_VCHAR    (AMIWIN_YMAX/25)
  420. + #define AMIWIN_HCHAR    (AMIWIN_XMAX/80)
  421. + #define AMIWIN_VTIC    (AMIWIN_YMAX/80)        
  422. + #define AMIWIN_HTIC    (AMIWIN_XMAX/80)        
  423. + static struct MsgPort     *GnuPort  = NULL;
  424. + static struct MsgPort     *GnuReply = NULL;
  425. + static struct PlotMessage *PlotMsg      = NULL;
  426. + static struct PlotCommand *commands = NULL;
  427. + static int                 ncommands = 0;
  428. + static int                 ncalloc = 0;
  429. + static BOOL                OutOfMemory = FALSE;
  430. + void SendMsg(enum GnuPlotCom com, char *str)
  431. + {
  432. +  if (PlotMsg && GnuReply)
  433. +   {
  434. +    PlotMsg->PlotMsg.mn_Node.ln_Type = NT_MESSAGE;
  435. +    PlotMsg->PlotMsg.mn_Length = sizeof(struct PlotMessage);
  436. +    PlotMsg->PlotMsg.mn_ReplyPort = GnuReply;
  437. +    PlotMsg->PlotCom.gpc_com = com;
  438. +    PlotMsg->PlotCom.gpc_arg = str;
  439. +    PlotMsg->PlotCom.gpc_ncommands = ncommands;
  440. +    PlotMsg->PlotCom.gpc_commands = commands;
  441. +    if (GnuPort)
  442. +     {
  443. +      PutMsg(GnuPort, PlotMsg);
  444. +      WaitPort(GnuReply);
  445. +      GetMsg(GnuReply);
  446. +     }
  447. +   }
  448. + }   
  449. + AMIWIN_init()
  450. + {
  451. +  GnuReply = CreatePort(GNUREPLY, 0);
  452. +  if ((GnuPort = FindPort(GNUPORT)) == NULL)
  453. +   {
  454. +    char FileName[108], s[108];
  455. +    
  456. +    NameFromLock(GetProgramDir(), s, 108);
  457. +    AddPart(s, "WinPlot", 108);
  458. +    sprintf(FileName, "\"%s\"", s);
  459. +    SystemTags(FileName,
  460. +           SYS_Asynch, TRUE,
  461. +           SYS_Input,  NULL,
  462. +           SYS_Output, NULL,
  463. +           TAG_END);
  464. +    while ((GnuPort = FindPort(GNUPORT)) == NULL)
  465. +     Delay(10);
  466. +   }
  467. +  PlotMsg = AllocMem(sizeof(struct PlotMessage), MEMF_PUBLIC|MEMF_CLEAR);
  468. + }
  469. + AMIWIN_text()
  470. + {
  471. +  SendMsg(SET_TEXT, NULL);
  472. + }
  473. + AMIWIN_graphics()
  474. + {
  475. +  int i;
  476. +  if (commands)
  477. +   {
  478. +    for(i=0; i<ncommands; i++)
  479. +     if (commands[i].pc_argstr)
  480. +      free(commands[i].pc_argstr);
  481. +    
  482. +    free(commands);
  483. +   }
  484. +  commands = NULL;
  485. +  ncommands = 0; ncalloc = 0; OutOfMemory = FALSE;
  486. +  SendMsg(SET_GRAPHICS, NULL);
  487. +  UpdateVars();
  488. + }
  489. + static void SetPlotCommand(enum PlotCom com, int arg1, int arg2, char *str)
  490. + {
  491. +  if (!OutOfMemory)
  492. +   {
  493. +    if (ncommands >= ncalloc)
  494. +     {
  495. +      ncalloc += 100;
  496. +      if (commands)
  497. +       {
  498. +        struct PlotCommand *newcommands = NULL;
  499. +        newcommands = realloc(commands, ncalloc * sizeof(struct PlotCommand));
  500. +        if (newcommands)
  501. +     commands = newcommands;
  502. +        else
  503. +     {
  504. +      ncalloc -= 100;
  505. +      OutOfMemory = TRUE;
  506. +      fprintf(stderr, "Warning: out of memory in SetPlotCommand() !!\n");
  507. +      return;
  508. +     }
  509. +       }
  510. +      else
  511. +       commands = malloc(ncalloc * sizeof(struct PlotCommand));
  512. +     }
  513. +    commands[ncommands].pc_com = com;
  514. +    commands[ncommands].pc_arg1 = arg1;
  515. +    commands[ncommands].pc_arg2 = arg2;
  516. +    if (str) 
  517. +     {
  518. +      commands[ncommands].pc_argstr = malloc(strlen(str)+1);
  519. +      strcpy(commands[ncommands].pc_argstr, str);
  520. +     }
  521. +    else commands[ncommands].pc_argstr = NULL;
  522. +    ncommands++;
  523. +   }
  524. + }
  525. + AMIWIN_linetype(int linetype)
  526. + {
  527. +  SetPlotCommand(LINETYP, linetype, 0, NULL);
  528. + }
  529. + AMIWIN_move(int x, int y)
  530. + {
  531. +  SetPlotCommand(MOVE, x, y, NULL);
  532. + }
  533. + AMIWIN_vector(int x, int y)
  534. + {
  535. +  SetPlotCommand(VECTOR, x, y, NULL);
  536. + }
  537. + AMIWIN_put_text(int x, int y, char *str)
  538. + {
  539. +  SetPlotCommand(PUT_TEXT, x, y, str);
  540. + }
  541. + AMIWIN_reset()
  542. + {
  543. +  SendMsg(RESET, NULL);
  544. +  if (GnuReply) DeletePort(GnuReply);
  545. +  GnuReply = NULL;
  546. +  if (PlotMsg) FreeMem(PlotMsg, sizeof(struct PlotMessage));
  547. +  PlotMsg = NULL;
  548. + }
  549. + AMIWIN_text_angle(int ang)
  550. + {
  551. +  SetPlotCommand(TEXT_ANGLE, ang, 0, NULL);
  552. +  return TRUE;
  553. + }
  554. + AMIWIN_justify_text(int mode)
  555. + {
  556. +  SetPlotCommand(JUSTIFY, mode, 0, NULL); 
  557. +  return TRUE;    
  558. + }
  559. diff -C 2 -N --recursive gnuplot/term.c gnuplot.neu/term.c
  560. *** gnuplot/term.c    Thu Sep 16 06:59:54 1993
  561. --- gnuplot.neu/term.c    Wed Oct 20 08:05:43 1993
  562. ***************
  563. *** 606,609 ****
  564. --- 606,612 ----
  565.   #endif /* AMIGASCREEN */
  566.   
  567. + #ifdef AMIGAWINDOW
  568. + #include "term/amigawin.trm"
  569. + #endif /* AMIGAWINDOW */
  570.   /* Dummy functions for unavailable features */
  571.   
  572. ***************
  573. *** 668,672 ****
  574.   
  575.   #ifdef AMIGASCREEN
  576. !     ,{"amiga", "Amiga Custom Screen",
  577.          AMIGA_XMAX, AMIGA_YMAX, AMIGA_VCHAR, AMIGA_HCHAR, 
  578.          AMIGA_VTIC, AMIGA_HTIC, options_null, AMIGA_init, AMIGA_reset, 
  579. --- 671,675 ----
  580.   
  581.   #ifdef AMIGASCREEN
  582. !     ,{"amigascreen", "Amiga Custom Screen",
  583.          AMIGA_XMAX, AMIGA_YMAX, AMIGA_VCHAR, AMIGA_HCHAR, 
  584.          AMIGA_VTIC, AMIGA_HTIC, options_null, AMIGA_init, AMIGA_reset, 
  585. ***************
  586. *** 676,679 ****
  587. --- 679,691 ----
  588.   #endif
  589.   
  590. + #ifdef AMIGAWINDOW
  591. +     ,{"amigawindow", "Amiga Window",
  592. +        AMIWIN_XMAX, AMIWIN_YMAX, AMIWIN_VCHAR, AMIWIN_HCHAR, 
  593. +        AMIWIN_VTIC, AMIWIN_HTIC, options_null, AMIWIN_init, AMIWIN_reset, 
  594. +        AMIWIN_text, null_scale, AMIWIN_graphics, AMIWIN_move, AMIWIN_vector,
  595. +        AMIWIN_linetype, AMIWIN_put_text, AMIWIN_text_angle, 
  596. +        AMIWIN_justify_text, do_point, do_arrow}
  597. + #endif    
  598.   #ifdef ATARI
  599.       ,{"atari", "Atari ST/TT",
  600. ***************
  601. *** 1701,1706 ****
  602.   #endif /* x11 */
  603.   
  604. ! #ifdef AMIGASCREEN
  605. !        term_name = "amiga";
  606.   #endif
  607.   
  608. --- 1713,1721 ----
  609.   #endif /* x11 */
  610.   
  611. ! #ifdef AMIGASCREEN 
  612. !        term_name = "amigascreen";
  613. ! #endif
  614. ! #ifdef AMIGAWINDOW
  615. !            term_name = "amigawindow";
  616.   #endif
  617.   
  618. diff -C 2 -N --recursive gnuplot/term.h gnuplot.neu/term.h
  619. *** gnuplot/term.h    Thu Sep 16 06:59:54 1993
  620. --- gnuplot.neu/term.h    Wed Oct 20 08:05:41 1993
  621. ***************
  622. *** 62,65 ****
  623. --- 62,69 ----
  624.    */
  625.   
  626. + #if defined(AMIGA_SC_6_1) && defined(_DEBUG)
  627. + #define DEBUG
  628. + #endif
  629.   /* These terminals are not relevant for MSDOS, OS2, MS-Windows, ATARI or Amiga */
  630.   #if !defined(MSDOS) && !defined(OS2) && !defined(_Windows) && !defined(ATARI) && !defined(AMIGA_SC_6_1) && !defined(AMIGA_AC_5)
  631. ***************
  632. *** 139,142 ****
  633. --- 143,147 ----
  634.   #if defined(AMIGA_SC_6_1) || defined(AMIGA_AC_5)
  635.   #define AMIGASCREEN    /* Amiga custom screen */
  636. + #define AMIGAWINDOW     /* Amiga MUI version */
  637.   #undef  AIFM
  638.   #undef  DXF
  639.